Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Specifying the lock or wait option as a variable

NO-LOCK, EXCLUSIVE-LOCK, SHARE-LOCK, and NO-WAIT are Progress keywords that also represent constants that you can assign to an integer variable and pass in as an integer to the FIND- and GET- methods. For example:

DEFINE VARIABLE iLock AS INTEGER NO-UNDO. 
iLock = EXCLUSIVE-LOCK. 
hBuffer:FIND-FIRST(“CustNum = 5”,iLock). 

This can be useful when the FIND or GET method is in a different procedure or function from the one that determines what the lock or wait mode should be, or when you want to enumerate these lock and wait options and pick one depending on some other value.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095